<p>
	<h1>Results</h1>
<% if @actions.length==0%>
There are currently no results available<p>
Please check back tomorrow<p>

<% else %>
<% if @actions.length>1 or (@actions.length==1 and ! @actions[0].last_flag)%>
There is more than one result available<p>

<% end %>
<h3>Summary</h3>

<table border=1>

	<tr>
    <th align=left>Test date</th>
    
    <th align=left>Test</th>
		<th align=left>Action</th>
  </tr>
	<% last_flag=0 %>
	<% @actions.each do |action| %>
	  <tr>
	    <td align=left valign=top><%=h action.test_date.strftime("%d/%m/%y") if action.test_date %></td>
	    <td align=left><%= h action.name %>&nbsp;<a href='#<%=action.identifier %>'>(view)</a></td>
			<td align=left><%= h action.action_code %></td>
		</tr>
		<% last_flag=1 if action.last_flag %>
	<% end %>
	</table>

	<br />
	<% if last_flag ==1%>
		This series of tests is now complete.<br>
		If you have any concerns or questions please contact your doctor.<p>
	<% else %>
		NB- There may be more results to come for this series of tests.<p>
	Please continue to check back.
	<% end %>


<h3>Details</h3>
<table border=1>
  <tr>
    <th align=left>Test date</th>
    
    <th align=left>Comment</th>
  </tr>
<% last_flag=0 %>
<% @actions.each do |action| %>
  <tr>
    <td align=left valign=top><a name="<%= action.identifier %>"><%=h action.test_date.strftime("%d/%m/%y")  if action.test_date%></td>
    <td align=left>
		<% if action.name and action.name!=""%>
		<h4><%= action.name %></h4>
		<% end %>
		<% if action.comment!=""%>	
		<%= displayComment(action.comment) %>
		<% end %>
		</td>
	</tr>
	<% last_flag=1 if action.last_flag %>
<% end %>
</table>

<br />
<% if last_flag ==1%>
	This series of tests is now complete.<br>
	If you have any concerns or questions please contact your doctor.<p>
<% else %>
	NB- There may be more results to come for this series of tests.<p>
Please continue to check back.
<% end %>
<% end %>